package com.bdsy.business.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bdsy.business.dao.ShopFollowMapper;
import com.bdsy.business.model.ShopFollow;
import com.bdsy.business.service.ShopFollowSevice;

@Service
public class ShopFollowSeviceImpl implements ShopFollowSevice{

	@Autowired
	private ShopFollowMapper shopFollowMapper;

	@Override
	public boolean add(ShopFollow shopFollow) {
		int result = shopFollowMapper.add(shopFollow);
		return result>0?true:false;
	}

	@Override
	public List<Map> selectShopFollwById(String userId) {
		@SuppressWarnings("rawtypes")
		List<Map> shopFollwList = shopFollowMapper.selectShopFollwById(userId);
		return shopFollwList;
	}

	@Override
	public List<ShopFollow> selectShopFollw(String userId, int shopId) {
		List<ShopFollow> shopFollw = shopFollowMapper.selectShopFollw(userId, shopId);
		return shopFollw;
	}

	@Override
	public boolean delete(String userId, int shopId) {
		int result = shopFollowMapper.delete(userId, shopId);
		return result>0?true:false; 
	}
	
	

}
